#ifndef __SPRITEBRICK_H__
#define __SPRITEBRICK_H__

#include "GameGlobal.h"
#include "DragEventReceive.h"

class SpriteBrick : public CCSprite, public CCTargetedTouchDelegate,public DragEventReceive
{
private:
	TSpriteBrickState	m_state;
	char*				m_normalTextureName;
	char*				m_dragTextureName;

public:
	SpriteBrick(char* aNormalName,char* aDragName);
	virtual ~SpriteBrick(void);

	CCRect				rect();
	bool				initWithTexture(CCTexture2D* aTexture);
	virtual void		onEnter();
	virtual void		onExit();

	virtual bool		ccTouchBegan(CCTouch* touch, CCEvent* event);
	virtual void		ccTouchMoved(CCTouch* touch, CCEvent* event);
	virtual void		ccTouchEnded(CCTouch* touch, CCEvent* event);

	bool				containsTouchLocation(CCTouch* touch);

	virtual CCObject*	copyWithZone(CCZone *pZone);

	static SpriteBrick* CreateWithTexture(char* aNormalName,char* aDragName);
};

#endif
